3.455 \(\int \sqrt{a^2+\frac{b^2}{x^2}+\frac{2 a b}{x}} \, dx\)

Optimal. Leaf size=73 \[ \frac{a x \sqrt{a^2+\frac{2 a b}{x}+\frac{b^2}{x^2}}}{a+\frac{b}{x}}-\frac{b \log \left (\frac{1}{x}\right ) \sqrt{a^2+\frac{2 a b}{x}+\frac{b^2}{x^2}}}{a+\frac{b}{x}} \]

[Out]

(a*Sqrt[a^2 + b^2/x^2 + (2*a*b)/x]*x)/(a + b/x) - (b*Sqrt[a^2 + b^2/x^2 + (2*a*b)/x]*Log[x^(-1)])/(a + b/x)

________________________________________________________________________________________

Rubi [A]  time = 0.0357841, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {1342, 646, 43} \[ \frac{a x \sqrt{a^2+\frac{2 a b}{x}+\frac{b^2}{x^2}}}{a+\frac{b}{x}}-\frac{b \log \left (\frac{1}{x}\right ) \sqrt{a^2+\frac{2 a b}{x}+\frac{b^2}{x^2}}}{a+\frac{b}{x}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a^2 + b^2/x^2 + (2*a*b)/x],x]

[Out]

(a*Sqrt[a^2 + b^2/x^2 + (2*a*b)/x]*x)/(a + b/x) - (b*Sqrt[a^2 + b^2/x^2 + (2*a*b)/x]*Log[x^(-1)])/(a + b/x)

Rule 1342

Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n + c/x^(2*n))^p/x^2,
x], x, 1/x] /; FreeQ[{a, b, c, p}, x] && EqQ[n2, 2*n] && ILtQ[n, 0]

Rule 646

Int[((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(a + b*x + c*x^2)^Fra
cPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b,
 c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && NeQ[2*c*d - b*e, 0]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \sqrt{a^2+\frac{b^2}{x^2}+\frac{2 a b}{x}} \, dx &=-\operatorname{Subst}\left (\int \frac{\sqrt{a^2+2 a b x+b^2 x^2}}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=-\frac{\sqrt{a^2+\frac{b^2}{x^2}+\frac{2 a b}{x}} \operatorname{Subst}\left (\int \frac{a b+b^2 x}{x^2} \, dx,x,\frac{1}{x}\right )}{a b+\frac{b^2}{x}}\\ &=-\frac{\sqrt{a^2+\frac{b^2}{x^2}+\frac{2 a b}{x}} \operatorname{Subst}\left (\int \left (\frac{a b}{x^2}+\frac{b^2}{x}\right ) \, dx,x,\frac{1}{x}\right )}{a b+\frac{b^2}{x}}\\ &=\frac{a \sqrt{a^2+\frac{b^2}{x^2}+\frac{2 a b}{x}} x}{a+\frac{b}{x}}+\frac{b \sqrt{a^2+\frac{b^2}{x^2}+\frac{2 a b}{x}} \log (x)}{a+\frac{b}{x}}\\ \end{align*}

Mathematica [A]  time = 0.0196016, size = 32, normalized size = 0.44 \[ \frac{x \sqrt{\frac{(a x+b)^2}{x^2}} (a x+b \log (x))}{a x+b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a^2 + b^2/x^2 + (2*a*b)/x],x]

[Out]

(x*Sqrt[(b + a*x)^2/x^2]*(a*x + b*Log[x]))/(b + a*x)

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 40, normalized size = 0.6 \begin{align*}{\frac{x \left ( ax+b\ln \left ( x \right ) \right ) }{ax+b}\sqrt{{\frac{{a}^{2}{x}^{2}+2\,abx+{b}^{2}}{{x}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a^2+b^2/x^2+2*a*b/x)^(1/2),x)

[Out]

((a^2*x^2+2*a*b*x+b^2)/x^2)^(1/2)/(a*x+b)*x*(a*x+b*ln(x))

________________________________________________________________________________________

Maxima [A]  time = 0.999886, size = 11, normalized size = 0.15 \begin{align*} a x + b \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a^2+b^2/x^2+2*a*b/x)^(1/2),x, algorithm="maxima")

[Out]

a*x + b*log(x)

________________________________________________________________________________________

Fricas [A]  time = 2.02493, size = 22, normalized size = 0.3 \begin{align*} a x + b \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a^2+b^2/x^2+2*a*b/x)^(1/2),x, algorithm="fricas")

[Out]

a*x + b*log(x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a^{2} + \frac{2 a b}{x} + \frac{b^{2}}{x^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a**2+b**2/x**2+2*a*b/x)**(1/2),x)

[Out]

Integral(sqrt(a**2 + 2*a*b/x + b**2/x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.1146, size = 39, normalized size = 0.53 \begin{align*} a x \mathrm{sgn}\left (a x^{2} + b x\right ) + b \log \left ({\left | x \right |}\right ) \mathrm{sgn}\left (a x^{2} + b x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a^2+b^2/x^2+2*a*b/x)^(1/2),x, algorithm="giac")

[Out]

a*x*sgn(a*x^2 + b*x) + b*log(abs(x))*sgn(a*x^2 + b*x)